package com.xdqzy.baseline.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author : winter
 * @version V1.0
 * @Title: 文件上传接口
 * @ClassName : com.ctbc.backend.common.config.FileServerProperties.java
 * @Description :
 * @date :  2020-11-03 22:37
 */
@ConfigurationProperties("file.server")
public class FileServerProperties {
    public enum UploadType {
        /**
         * 文件服务器
         */
        OSS,
        /**
         * 本地存储
         */
        LOCAL;

    }

    private UploadType uploadType = UploadType.LOCAL;

    private LocalFileServerProperties localServer;

    private OssFileServerProperties ossServer;


    public UploadType getUploadType() {
        return uploadType;
    }

    public void setUploadType(UploadType uploadType) {
        this.uploadType = uploadType;
    }

    public LocalFileServerProperties getLocalServer() {
        return localServer;
    }

    public void setLocalServer(LocalFileServerProperties localServer) {
        this.localServer = localServer;
    }

    public OssFileServerProperties getOssServer() {
        return ossServer;
    }

    public void setOssServer(OssFileServerProperties ossServer) {
        this.ossServer = ossServer;
    }

    @Data
    public static class LocalFileServerProperties {
        /**
         * 本地url前缀
         */
        private String localPrefix;
        /**
         * 目标存储路径
         */
        private String targetPath;
    }

    /**
     * @author : winter
     * @version V1.0
     * @Title: oss配置
     * @ClassName : com.ctbc.backend.common.config.FileServerProperties.java
     * @Description :
     * @date :  2020-11-03 22:42
     */
    public static class OssFileServerProperties {

    }


}
